# -*- mode: snippet -*-
# name: def decorator
# key: dec
# uuid: dec
# group: definitions
# --
def ${1:decorator}(func):
    $2
    def _$1(*args, **kwargs):
        $3
        ret = func(*args, **kwargs)
        $4
        return ret

    return _$1